﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test.DataAccess.POCO
{
    [Table("Configuration")]
    public  class Configuration:BaseEntity
    {
        [Required]
        [StringLength(100)]
        [Display(Name = "配置名称")]
        public string Name { get; set; }

        [Required]
        [StringLength(100)]
        [Display(Name = "配置KEY")]
        public string Key { get; set; }

        [Display(Name = "配置值")]
        public string ValueOrJson { get; set; }

        [Display(Name = "配置类型")]
        public ConfigurationType Type { get; set; }
    }

    public enum ConfigurationType
    {
        /// <summary>
        /// 系统配置
        /// </summary>
        [Description("系统配置")]
        SYSTEM = 0,
        /// <summary>
        /// 网站配置
        /// </summary>
        [Description("网站配置")]
        SITE = 1,
    }
}

